(function(b, c) {
    var d = b.YYMobileBridge = {};
    var f = null,
        a = b.console || { log: function() {} };
    d.refreshActCallback = function(g) { a.log(g) };
    b.refreshAct = function(g) { g = c.parseJSON(g);
        d.refreshActCallback(g) };
    d.isUseBridge = function() {
        return f != null };
    d.initBridge = function(g) { d.useBridge = true;
        if (!f) { f = b.WebViewJavascriptBridge;
            f.init(g || function() {}) }
        return f };
    d.loadUrl = function(g, h) {
        if (!g) { a.log("loadUrl error: url is blank");
            return false }
        if (d.isUseBridge()) {
            if (getBridge()) { f.callHandler("clientLoadURL", g, h) } else { alert("clientLoadURL bridge is null") } } else { b.location.href = "objc://clientLoadUrl/" + g } };
    d.login = function(g) { e("clientLogin", null, g) };

    function e(g, h, j) {
        if (d.initBridge()) {
            try { f.callHandler(g, h || null, j || null) } catch (i) { a.log(g + " bridge call error: " + i) } } else { alert(g + " bridge is null") } }
    d.getTicketAndGUID = function(g) { e("getTicketAndGUID", null, g) } })(window, jQuery);
(function() {
    if (navigator.userAgent.match(/(iPad|iPhone|iPod).*?YY/g)) {
        if ((window.opener == null && window.YYApiCore == null) || (window.opener != null && window.opener.YYApiCore == null)) {
            var a = document.createElement("iframe");
            a.style.display = "none";
            a.src = "yyapi://load";
            document.body.appendChild(a) } else {
            if (window.opener != null && window.YYApiCore == null && window.opener.YYApiCore != null) { window.YYApiCore = window.opener.YYApiCore } } } else {
        if (navigator.userAgent.indexOf("Android") != -1) { YYApiCore = { __GLOBAL_FUNC_INDEX__: 0, invokeClientMethod: function(c, b, d, h) {
                    try {
                        var f = "";
                        if (h) {
                            if (typeof h == "function") { f = YYApiCore.createGlobalFuncForCallback(h) } else { f = h } }
                        r = JSON.parse(window.AndroidJSInterfaceV2.invoke(c, b, JSON.stringify(d || {}), f)) } catch (g) {
                        if (console) { console.log(g) } }
                    return r }, createGlobalFuncForCallback: function(c) {
                    if (c) {
                        var b = "__GLOBAL_CALLBACK__" + (YYApiCore.__GLOBAL_FUNC_INDEX__++);
                        window[b] = function() {
                            var d = arguments;
                            var e = (typeof c == "function") ? c : window[c];
                            setTimeout(function() { e.apply(null, d) }, 0) };
                        return b }
                    return null }, invokeWebMethod: function(c, b) { YYApiCore.invokeCallbackWithArgs(c, [b]) }, invokeCallbackWithArgs: function(e, b) {
                    if (e) {
                        var d = null;
                        var c;
                        if (typeof e == "function") { d = e } else {
                            if ((c = window[e]) && typeof c == "function") { d = c } }
                        if (d) { setTimeout(function() { d.apply(null, b) }, 0) } } } } } } })();

function consoleLog() {
    if (console) { console.log.apply(console, arguments) } }
var YYMobileJavascriptAPILevelTable = { yyuigoto: 1, pop: 1, gotoLogin: 1, gotoRegister: 1, gotoPersonalCenter: 1, gotoVipSign: 1, gotoPhotoAlbum: 1, gotoPrivilege: 1, gotoCharacterEmoticonPrivilege: 1, gotoColorfulBubblePrivilege: 1, gotoLiveHome: 1, gotoLiveCenter: 1, gotoSettingCenter: 1, gotoColorfulBubble: 1, gotoPluginManagementSetting: 1, gotoNeighborhood: 1, joinChannel: 1, joinLive: 1, gotoPluginManagement: 1, gotoPluginItem: 1, gotoPluginItemOutline: 1, checkLoginStatusWithCallback: 1, requestUserWebToken: 1, followUser: 1, unFollowUser: 1, getAppInfo: 2, setPhoneNumber: 2, showAlertMessage: 2, setCommonStorageValueForKey: 2, getCommonStorageValueForKey: 2, showProgressWindow: 2, hideProgressWindow: 2, postNotification: 2, deleteSharedCookie: 2, gotoWeb: 2, goto1931: 2, gotoMessageCenter: 2, closeAllWindow: 3, gotoBrowser: 3, showBackBtn: 3, hideBackBtn: 3 };
var YYMobileJavascriptAPIVersionTable = { yyuigoto: "1.1", pop: "1.1", gotoLogin: "1.1", gotoRegister: "1.1", gotoPersonalCenter: "1.1", gotoVipSign: "1.1", gotoPhotoAlbum: "1.1", gotoPrivilege: "1.1", gotoCharacterEmoticonPrivilege: "1.1", gotoColorfulBubblePrivilege: "1.1", gotoLiveHome: "1.1", gotoLiveCenter: "1.1", gotoSettingCenter: "1.1", gotoColorfulBubble: "1.1", gotoPluginManagementSetting: "1.1", gotoNeighborhood: "1.1", joinChannel: "1.1", joinLive: "1.1", gotoPluginManagement: "1.1", gotoPluginItem: "1.1", gotoPluginItemOutline: "1.1", checkLoginStatusWithCallback: "1.1", requestUserWebToken: "1.1", followUser: "1.1", unFollowUser: "1.1", getAppInfo: "1.2", setPhoneNumber: "1.2", showAlertMessage: "1.2", setCommonStorageValueForKey: "1.2", getCommonStorageValueForKey: "1.2", showProgressWindow: "1.2", hideProgressWindow: "1.2", postNotification: "1.2", deleteSharedCookie: "1.2", gotoWeb: "1.2", goto1931: "1.2", gotoMessageCenter: "1.2", closeAllWindow: "1.3", gotoBrowser: "1.3", showBackBtn: "1.3", hideBackBtn: "1.3" };
var YYMobileJavascriptAPIVersionTable = { "1.1": 1, "1.2": 2, "1.3": 3 };
var YYMobileNotificationIDs = { CarrierDataTrafficPackageSubscribeStateChanged: 4097 };
var YYMobileNotificationUserInfoKeys = { CarrierDataTrafficPackageSubscribeStateChangedUserInfoNewState: "CarrierDataTrafficPackageSubscribeStateChangedUserInfoNewState" };
var YYMobileOverridable = { popAction: function() {
        return false } };
var YYMobileJavascriptWasReady = false;
var __YYMobileAPILevel__ = 0;

function onJavascriptBridgeReady(a) {
    if (window.WebViewJavascriptBridge) { a(WebViewJavascriptBridge) } else { document.addEventListener("WebViewJavascriptBridgeReady", function() { consoleLog("bridge ready");
            initializeJSHandles(WebViewJavascriptBridge);
            a(WebViewJavascriptBridge) }, false) } }

function onYYMobileJavascriptAPIReady(a) {
    if (YYMobileJavascriptWasReady) { a() } else { document.addEventListener("YYMobileJavascriptAPIReady", function() { a() }) } }

function initializeYYMobileAPI() { onJavascriptBridgeReady(function(b) { b.init(function(d, c) {});
        YYMobileJavascriptWasReady = true;
        var a = document.createEvent("Events");
        a.initEvent("YYMobileJavascriptAPIReady");
        document.dispatchEvent(a) }) }

function initializeJSHandles(a) { a.registerHandler("brdigeEventHandler", onBridgeEvent);
    a.registerHandler("askForHandlePopAction", function(c, b) {
        var d = YYMobileOverridable.popAction();
        b(d) }) }

function safeCallHandler(b, a, f) {
    var e = b;
    var d = a;
    var c = f;
    onYYMobileJavascriptAPIReady(function() { window.WebViewJavascriptBridge.callHandler(e, d, c) }) }

function getAPILevel(a) { safeCallHandler("getAPILevel", null, a) }

function pop() { safeCallHandler("yyuipop") }

function _goto(a) { safeCallHandler("yyuigoto", { uri: a }) }

function gotoLogin() { window.YYApiCore.invokeClientMethod("ui", "showLoginDialog") }

function gotoRegister() { _goto("yymobile://Login/Register") }

function gotoPersonalCenter(a) { _goto("yymobile://PersonalCenter/" + a) }

function gotoVipSign() { _goto("yymobile://PersonalCenter/VipSign") }

function gotoPhotoAlbum(a) { _goto("yymobile://PersonalCenter/" + a + "/PhotoAlbum") }

function gotoPrivilege() { _goto("yymobile://Privilege/All") }

function gotoCharacterEmoticonPrivilege() { _goto("yymobile://Privilege/CharacterEmoticon") }

function gotoColorfulBubblePrivilege() { _goto("yymobile://Privilege/ColorfulBubble") }

function gotoLiveHome() { _goto("yymobile://LiveCenter/Nav/-1") }

function goto1931Home() { _goto("yymobile://1931/Home") }

function gotoLiveCenter(b, a) { _goto("yymobile://LiveCenter/" + b + "/" + a) }

function gotoSettingCenter() { _goto("yymobile://Settings/Home") }

function gotoColorfulBubble() { _goto("yymobile://Settings/ColorfulBubble") }

function gotoPluginManagementSetting() { _goto("yymobile://Settings/PluginManagement") }

function gotoNeighborhood() { _goto("yymobile://Social/Neighborhood") }

function joinChannel(a) { _goto("yymobile://Channel/" + a) }

function joinLive(a, b) { _goto("yymobile://Channel/Live/" + a + "/" + b) }

function gotoPluginManagement() { _goto("yymobile://Plugin/Management") }

function gotoPluginItem(a) { _goto("yymobile://Plugin/Item/" + a) }

function gotoPluginItemOutline(a) { _goto("yymobile://Plugin/Item/" + a + "/Outline") }

function gotoWeb(b, e, a) {
    var d = encodeURIComponent(encodeURIComponent(b));
    var c = (1 << 2);
    if (e) { c = c | (1 << 1) }
    if (a) { c = c | (1 << 0) }
    _goto("yymobile://Web/Features/" + c + "/Url/" + d) }

function goto1931(a) {
    var b = encodeURIComponent(encodeURIComponent(a));
    _goto("yymobile://1931/" + b) }

function gotoMessageCenter() { _goto("yymobile://MessageCenter/Home") }

function goto1931Girl(a) {
    var b = encodeURIComponent(encodeURIComponent(a));
    _goto("yymobile://1931/Girl/" + b) }

function goto1931Tabs(b) {
    var a = encodeURIComponent(encodeURIComponent(JSON.stringify(b)));
    _goto("yymobile://1931/Tabs/" + a) }

function goto1931PhotoView(b) {
    var a = encodeURIComponent(encodeURIComponent(JSON.stringify(b)));
    _goto("yymobile://1931/PhotoView/" + a) }

function checkLoginStatusWithCallback(a, b) { safeCallHandler("isLoggedInWithUserPassword", {}, function(c) {
        if (c) { a() } else { b() } }) }

function loginTest() { checkLoginStatusWithCallback(function() { joinChannel(2080) }, function() { gotoLogin() }) }

function requestUserWebToken(a) { safeCallHandler("requestWebToken", {}, a) }

function followUser(a) { safeCallHandler("followUser", a) }

function unFollowUser(a) { safeCallHandler("unFollowUser", a) }

function getAppInfo(a) { safeCallHandler("getAppInfo", {}, function(b) { a(b) }) }

function setPhoneNumber(a) { safeCallHandler("setPhoneNumber", a) }

function showAlertMessage(c, b, a, d) { safeCallHandler("showAlertMessage", { title: c, message: b, buttons: a }, function(e) { d(e) }) }

function showAlertMessageSimple(b, a) { showAlertMessage(b, a, new Array("我知道了"), function(c) {}) }

function setCommonStorageValueForKey(b, a, c) { safeCallHandler("setCommonStorageValueForKey", { value: b, key: a }, function(d) { c(d) }) }

function getCommonStorageValueForKey(a, b) { safeCallHandler("getCommonStorageValueForKey", a, function(c) { b(c) }) }

function showProgressWindow(a) { safeCallHandler("showProgressWindow", { label: a }) }

function hideProgressWindow() { safeCallHandler("hideProgressWindow") }

function postNotification(b, a) {
    if (b) { safeCallHandler("postNotification", { notificationID: b, userInfo: a }) } }

function deleteSharedCookie(a, b) { safeCallHandler("deleteSharedCookie", a, function(c) {
        if (b) { b(c.count) } }) }

function onBridgeEvent(a) {
    switch (a.type) {
        case "LoginEvent":
            if (YYMobileOverridable.loginEvent) { YYMobileOverridable.loginEvent(a) }
            break;
        case "LogoutEvent":
            consoleLog("on logout");
            break;
        case "FollowEvent":
            consoleLog("on follow success=" + a.isSuccess + ",uid=" + a.uid);
            break;
        case "UnFollowEvent":
            consoleLog("on unfollow success=" + a.isSuccess + ",uid=" + a.uid);
            break;
        case "ApiUnSupportedEvent":
            consoleLog("client un support api:" + a.apiUri);
            break } }
initializeYYMobileAPI();
var YYMobile = { Overridable: YYMobileOverridable, NotificationIDs: YYMobileNotificationIDs, NotificationUserInfoKeys: YYMobileNotificationUserInfoKeys, pop: pop, gotoLogin: gotoLogin, gotoRegister: gotoRegister, gotoPersonalCenter: gotoPersonalCenter, gotoVipSign: gotoVipSign, gotoPhotoAlbum: gotoPhotoAlbum, gotoPrivilege: gotoPrivilege, gotoCharacterEmoticonPrivilege: gotoCharacterEmoticonPrivilege, gotoColorfulBubblePrivilege: gotoColorfulBubblePrivilege, gotoLiveHome: gotoLiveHome, gotoLiveCenter: gotoLiveCenter, gotoSettingCenter: gotoSettingCenter, gotoColorfulBubble: gotoColorfulBubble, gotoPluginManagementSetting: gotoPluginManagementSetting, gotoNeighborhood: gotoNeighborhood, joinChannel: joinChannel, joinLive: joinLive, gotoPluginManagement: gotoPluginManagement, gotoPluginItem: gotoPluginItem, gotoPluginItemOutline: gotoPluginItemOutline, checkLoginStatusWithCallback: checkLoginStatusWithCallback, requestUserWebToken: requestUserWebToken, followUser: followUser, unFollowUser: unFollowUser, getAPILevel: getAPILevel, getAppInfo: getAppInfo, setPhoneNumber: setPhoneNumber, showAlertMessage: showAlertMessage, showAlertMessageSimple: showAlertMessageSimple, setCommonStorageValueForKey: setCommonStorageValueForKey, getCommonStorageValueForKey: getCommonStorageValueForKey, showProgressWindow: showProgressWindow, hideProgressWindow: hideProgressWindow, postNotification: postNotification, deleteSharedCookie: deleteSharedCookie, gotoWeb: gotoWeb, goto1931: goto1931, gotoMessageCenter: gotoMessageCenter, closeAllWindow: function closeAllWindow() { safeCallHandler("closeAllWindow") }, showBackBtn: function showBackBtn() { safeCallHandler("showBackBtn") }, hideBackBtn: function hideBackBtn() { safeCallHandler("hideBackBtn") }, gotoBrowser: function gotoBrowser(a) { safeCallHandler("gotoBrowser", { url: a }) } };
var Y1931Overridable = { onNavigationBarButtonItemTapped: function(a, b) {}, onGetNavigationBarInformation: function() {
        return {} } };
var Y1931BarButtonItemIcons = { POST: 1000, MESSAGE: 1001, SHARE: 1002, POSTOWNER: 1003, CLOSE: 1004, CLEARMESSAGE: 1005 };
var Y1931Images = { "1931LOGO": 1931 };
var Y1931API = { initialize1931API: function() { onJavascriptBridgeReady(function(a) { a.registerHandler("1931NavigationBarButtonItemTapped", function(c, b) { Y1931Overridable.onNavigationBarButtonItemTapped(c.identifier, c.selected) });
            a.registerHandler("get1931NavigationBarInformation", function(c, b) { b(Y1931Overridable.onGetNavigationBarInformation()) }) }) }, createBarButtonItem: function(c, g, f, b, a, e) {
        var d = {};
        d.identifier = c;
        d.icon = f;
        d.title = g;
        d.selectable = b;
        d.badge = a;
        d.selected = e;
        return d }, createNavigationBarInformation: function(d, a, b) {
        var c = {};
        c.title = d;
        c.titleImage = a;
        c.rightItems = b;
        return c }, setNavigationBarLeftItems: function(a) {}, setNavigationBarRightItems: function(a) { safeCallHandler("setNavigationRightItems", a) }, setNavigationTitle: function(b, a) { safeCallHandler("setNavigationTitle", { title: b, titleImage: a }) }, updateNavigationBarItemBadge: function(b, a) { safeCallHandler("updateNavigationBarItemBadge", { itemId: b, badge: a }) }, share: function(c, b, f, d, a, e) { safeCallHandler("share", { content: c, imageUrl: b, title: f, shareUrl: d, musicUrl: a, videoUrl: e }) } };
Y1931API.initialize1931API();
if (typeof(window.console) == "undefined") { window.console = { log: function() {} } }
var hiido = (function() {
    var a = 1.1;
    var c = window;
    var d = c._hiidoDebug || false;
    var b = { log: function() {
            if (d) { c.console && c.console.log(arguments) } } };
    var f = { domain: "ylog.hiido.com", ipPrefix: "183.61.2.", ips: [91, 92, 94, 95, 96, 97, 98], getServerUrl: function(i) { i = i || this.domain;
            var g = location.protocol;
            var j = "j.gif?";
            return g + "//" + i + "/" + j }, randomIp: function() {
            var g = Math.random();
            var j = Math.round(g * (this.ips.length - 1));
            var i = this.ips[j];
            return this.ipPrefix + i }, getParam: function(g) {
            var i = g;
            var j = [];
            i.time = parseInt(1 * new Date() / 1000);
            i.ui = this.getCookie("hiido_ui");
            i.username = this.getCookie("username");
            for (h in i) {
                if (i.hasOwnProperty(h)) { j.push(encodeURIComponent(h) + "=" + (i[h] === undefined || i[h] === null ? "" : encodeURIComponent(i[h]))) } }
            return j.join("&") }, send: function(j, k, l) {
            var m = l || 0;
            var i = new Image();
            var g = this;
            i.onerror = function() {
                if (m <= 1) { g.send(j, k, ++m) } else {
                    if (m == 2) { g.send(k, k, ++m) } } };
            i.src = j }, getCookie: function(i) {
            var g, j = new RegExp("(^| )" + i + "=([^;]*)(;|$)");
            if (g = document.cookie.match(j)) {
                return unescape(g[2]) } else {
                return null } } };
    var e = { stat: function(j) {
            if (!j) {
                return false }
            var g = f.getServerUrl();
            var l = f.getParam(j);
            var i = g + l;
            var k = f.getServerUrl(f.randomIp()) + l;
            f.send(i, k) }, loadHiidoJS: function() { _hiido_no = 0;
            var j = document.getElementsByTagName("head")[0] || document.documentElement;
            var i = document.createElement("script");
            i.src = "http://www.duowan.com/duowan.js";
            i.type = "text/javascript";
            var g = false;
            i.onload = i.onreadystatechange = function() {
                if (!g && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { g = true;
                    i.onload = i.onreadystatechange = null;
                    if (j && i.parentNode) { j.removeChild(i) } } };
            j.insertBefore(i, j.firstChild) }, addUVToHiido: function(i) {
            if (toString.call(i) != "[object Array]") { _hiido_wid = [];
                _hiido_wid.push(i) } else { _hiido_wid = i }
            if (typeof _hiido_no === "undefined") { _hiido_no = 0 }
            if (window.hiidov3) {
                try { hiidov3() } catch (g) {} } else { this.loadHiidoJS() } } };
    if (typeof(module) === "object") { module.exports = e }
    window.appHiido = e;
    return e })();
var param = { act: "webevent", eventid: "", value: "", class1: "ent", class2: "ceremony", eventype: "1", uid: 0, bak1: 0, bak2: 0 };
window.reportEvent = function(a, b, e, c, d) { YYMobile.getAppInfo(function(i) {
        var g = i.uid > 0 ? i.uid : 0;
        g = g || i.imei || i.imsi || i.phoneNumbe;
        if (!e || e == -1) { e = 0 }
        var f = $.extend({}, param);
        f.eventid = a;
        f.value = b;
        f.uid = g || f.uid;
        f.bak1 = e || f.bak1;
        f.bak2 = i.imei;
        hiido.stat(f);
        if (typeof d == "function") { d(f) } }) };
var ua = navigator.userAgent, isIos = ua.match(/iPhone|iPad|iPod/i) && ua.indexOf("AppleWebKit") > -1;
window.getDeviceInfo = function() {
    return window.YYApiCore.invokeClientMethod("device", "deviceInfo") };
var appVersion = "0";
var canOpenInnerView = false;
var stateTicket;
var isUserNewAPI = function() {
    var a = false;
    if (isIos) {
        return true }
    try {
        var d = 0;
        d = getDeviceInfo();
        if (d) { appVersion = d.appVersion;
            var b = appVersion.replace(/[^0-9.]/ig, "");
            var f = b.split(".");
            $.each(f, function(e, g) { g = Number(g);
                if (e == 0) {
                    if (g < 3) {
                        return false } } else {
                    if (e == 1) {
                        if (g > 0) { a = true;
                            canOpenInnerView = true;
                            return false } } else {
                        if (e == 2) {
                            if (g > 0) { a = true }
                            if (g > 5) { canOpenInnerView = true } } } } }) } } catch (c) { console.log("exception:" + c) }
    return a }();
window.openPageInner = function(a) {
    if (a) { window.location.href = "objc://clientLoadUrl/" + a } };
window.showPoneMsg = function(b, a) {
    if (YYMobile.showAlertMessageSimple) { YYMobile.showAlertMessageSimple(b, a) } else { alert(a) } };
window.sendHeightToClient = function(a) {
    if (canOpenInnerView) {
        if (!a) { a = document.body.clientHeight }
        window.YYApiCore.invokeClientMethod("ui", "webHeightPx", { height: a }) } };
window.gotoPage = function(a) {
    if (isUserNewAPI) {
        var b = encodeURIComponent(encodeURIComponent(a));
        window.YYApiCore.invokeClientMethod("ui", "goto", { uri: "yymobile://Web/Features/5/Url/" + b }) } else { window.location.href = a } };
window.gotoPageInner = function(a) {
    if (a) { window.location.href = a } };
window.backJoinLive = function() {
    if (!isNaN(window.topSid) && !isNaN(window.subSid) && topSid != 0) { YYMobile.joinLive(window.topSid, window.subSid) } else { YYMobile.gotoLiveHome() } };
window.errBackHome = function(a) {
    if (!a) { a = "用户信息查询失败，请稍候再试！" }
    showPoneMsg("确定", a);
    setTimeout(pop, 1500) };
window.showNobleRightButton = function() {
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "showNobleRightButton") } };
window.hideNobleRightButton = function() {
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "hideNobleRightButton") } };
window.setNavigationBarTitle = function(a) {
    if (!a) { a = "活动页面" }
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "setNavigationBarTitle", { title: a }) } };

function checkTicketStatus(d, c, b) {
    var a = window.YYApiCore.invokeClientMethod("data", "webTicket");
    if (a && a.length > 0) { stateTicket = a;
        d(a) } else { YYMobile.checkLoginStatusWithCallback(function() { YYMobile.requestUserWebToken(function(e) {
                if (e && e.length > 0) { stateTicket = e;
                    d(e) } else {
                    if (c) { YYMobileOverridable.loginEvent = function() {
                            if (b) { b() } };
                        YYMobile.gotoLogin() } } }) }, function() {
            if (c) { YYMobileOverridable.loginEvent = function() { window.location.reload() };
                YYMobile.gotoLogin() } }) } };
if (typeof(window.console) == "undefined") { window.console = { log: function() {} } }
var hiido = (function() {
    var a = 1.1;
    var c = window;
    var d = c._hiidoDebug || false;
    var b = { log: function() {
            if (d) { c.console && c.console.log(arguments) } } };
    var f = { domain: "ylog.hiido.com", ipPrefix: "183.61.2.", ips: [91, 92, 94, 95, 96, 97, 98], getServerUrl: function(i) { i = i || this.domain;
            var g = location.protocol;
            var j = "j.gif?";
            return g + "//" + i + "/" + j }, randomIp: function() {
            var g = Math.random();
            var j = Math.round(g * (this.ips.length - 1));
            var i = this.ips[j];
            return this.ipPrefix + i }, getParam: function(g) {
            var i = g;
            var j = [];
            i.time = parseInt(1 * new Date() / 1000);
            i.ui = this.getCookie("hiido_ui");
            i.username = this.getCookie("username");
            for (h in i) {
                if (i.hasOwnProperty(h)) { j.push(encodeURIComponent(h) + "=" + (i[h] === undefined || i[h] === null ? "" : encodeURIComponent(i[h]))) } }
            return j.join("&") }, send: function(j, k, l) {
            var m = l || 0;
            var i = new Image();
            var g = this;
            i.onerror = function() {
                if (m <= 1) { g.send(j, k, ++m) } else {
                    if (m == 2) { g.send(k, k, ++m) } } };
            i.src = j }, getCookie: function(i) {
            var g, j = new RegExp("(^| )" + i + "=([^;]*)(;|$)");
            if (g = document.cookie.match(j)) {
                return unescape(g[2]) } else {
                return null } } };
    var e = { stat: function(j) {
            if (!j) {
                return false }
            var g = f.getServerUrl();
            var l = f.getParam(j);
            var i = g + l;
            var k = f.getServerUrl(f.randomIp()) + l;
            f.send(i, k) }, loadHiidoJS: function() { _hiido_no = 0;
            var j = document.getElementsByTagName("head")[0] || document.documentElement;
            var i = document.createElement("script");
            i.src = "http://www.duowan.com/duowan.js";
            i.type = "text/javascript";
            var g = false;
            i.onload = i.onreadystatechange = function() {
                if (!g && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { g = true;
                    i.onload = i.onreadystatechange = null;
                    if (j && i.parentNode) { j.removeChild(i) } } };
            j.insertBefore(i, j.firstChild) }, addUVToHiido: function(i) {
            if (toString.call(i) != "[object Array]") { _hiido_wid = [];
                _hiido_wid.push(i) } else { _hiido_wid = i }
            if (typeof _hiido_no === "undefined") { _hiido_no = 0 }
            if (window.hiidov3) {
                try { hiidov3() } catch (g) {} } else { this.loadHiidoJS() } } };
    if (typeof(module) === "object") { module.exports = e }
    window.appHiido = e;
    return e })();
var param = { act: "webevent", eventid: "", value: "", class1: "ent", class2: "ceremony", eventype: "1", uid: 0, bak1: 0, bak2: 0 };
window.reportEvent = function(a, b, e, c, d) { YYMobile.getAppInfo(function(i) {
        var g = i.uid > 0 ? i.uid : 0;
        g = g || i.imei || i.imsi || i.phoneNumbe;
        if (!e || e == -1) { e = 0 }
        var f = $.extend({}, param);
        f.eventid = a;
        f.value = b;
        f.uid = g || f.uid;
        f.bak1 = e || f.bak1;
        f.bak2 = i.imei;
        hiido.stat(f);
        if (typeof d == "function") { d(f) } }) };
ua = navigator.userAgent, isIos = ua.match(/iPhone|iPad|iPod/i) && ua.indexOf("AppleWebKit") > -1;
window.getDeviceInfo = function() {
    return window.YYApiCore.invokeClientMethod("device", "deviceInfo") };
var appVersion = "0";
var canOpenInnerView = false;
var stateTicket;
var isUserNewAPI = function() {
    var a = false;
    if (isIos) {
        return true }
    try {
        var d = 0;
        d = getDeviceInfo();
        if (d) { appVersion = d.appVersion;
            var b = appVersion.replace(/[^0-9.]/ig, "");
            var f = b.split(".");
            $.each(f, function(e, g) { g = Number(g);
                if (e == 0) {
                    if (g < 3) {
                        return false } else {
                        if (g > 3) { canOpenInnerView = true;
                            a = true;
                            return false } } } else {
                    if (e == 1) {
                        if (g > 0) { a = true;
                            canOpenInnerView = true;
                            return false } } else {
                        if (e == 2) {
                            if (g > 0) { a = true }
                            if (g > 5) { canOpenInnerView = true } } } } }) } } catch (c) { console.log("exception:" + c) }
    return a }();
window.openPageInner = function(a) {
    if (a) { window.location.href = "objc://clientLoadUrl/" + a } };
window.showPoneMsg = function(b, a) {
    if (YYMobile.showAlertMessageSimple) { YYMobile.showAlertMessageSimple(b, a) } else { alert(a) } };
window.sendHeightToClient = function(a) {
    if (canOpenInnerView) {
        if (!a) { a = document.body.clientHeight }
        window.YYApiCore.invokeClientMethod("ui", "webHeightPx", { height: a }) } };
window.gotoPage = function(a) {
    if (isUserNewAPI) {
        var b = encodeURIComponent(encodeURIComponent(a));
        window.YYApiCore.invokeClientMethod("ui", "goto", { uri: "yymobile://Web/Features/5/Url/" + b }) } else { window.location.href = a } };
window.gotoPageInner = function(a) {
    if (a) { window.location.href = a } };
window.backJoinLive = function() {
    if (!isNaN(window.topSid) && !isNaN(window.subSid) && topSid != 0) { YYMobile.joinLive(window.topSid, window.subSid) } else { YYMobile.gotoLiveHome() } };
window.errBackHome = function(a) {
    if (!a) { a = "用户信息查询失败，请稍候再试！" }
    showPoneMsg("确定", a);
    setTimeout(pop, 1500) };
window.showNobleRightButton = function() {
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "showNobleRightButton") } };
window.hideNobleRightButton = function() {
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "hideNobleRightButton") } };
window.setNavigationBarTitle = function(a) {
    if (!a) { a = "活动页面" }
    if (isUserNewAPI) { window.YYApiCore.invokeClientMethod("ui", "setNavigationBar", { title: { title: a } }) } };

function checkTicketStatus(d, c, b) {
    var a = window.YYApiCore.invokeClientMethod("data", "webTicket");
    if (a && a.length > 0) { stateTicket = a;
        d(a) } else { YYMobile.checkLoginStatusWithCallback(function() { YYMobile.requestUserWebToken(function(e) {
                if (e && e.length > 0) { stateTicket = e;
                    d(e) } else {
                    if (c) { YYMobileOverridable.loginEvent = function() {
                            if (b) { b() } };
                        YYMobile.gotoLogin() } } }) }, function() {
            if (c) { YYMobileOverridable.loginEvent = function() {
                    if (b) { b() } };
                YYMobile.gotoLogin() } }) } }
var mobileHiidoParam = { act: "webevent", eventype: "1", eventid: "0", uid: "0", hostid: "0", class1: "ent", class2: "earn", imei: "0", sys: "3", act_type: "0", channelSource: "official" };
var reportPhoneEvent = function(b, a, d, c) { getAppInfo(function(k) {
        var f = k.uid > 0 ? k.uid : 0;
        f = f || k.imei || k.imsi || k.phoneNumbe;
        if (!a || a == -1) { a = 0 }
        var e = $.extend({}, mobileHiidoParam);
        var i = k.system;
        var j = 0;
        if (i) {
            if (i.toLowerCase() == "iOS".toLowerCase()) { j = 0 } else {
                if (i.toLowerCase() == "Android".toLowerCase()) { j = 2 } } }
        e.eventid = b;
        e.uid = f || e.uid;
        e.hostid = d || e.hostid;
        e.sys = j;
        e.imei = k.imei;
        e.act_type = a;
        var l = "";
        try { l = window.YYApiCore.invokeClientMethod("data", "getChannelSource");
            if (typeof l !== "string") { l = "" } } catch (g) { l = "" }
        e.channelSource = l;
        hiido.stat(e);
        if (typeof c == "function") { c(e) } }) };
